package edu.polsl.bio.str.node.delegate;

import edu.polsl.bio.str.common.exception.ManagerException;
import edu.polsl.bio.str.node.remoting.ServiceLocator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * //todo class description
 * <p/>
 * Created on: Jun 12, 2011 9:48:27 PM <br/>
 * <a href="http://www.polsl.pl">www.polsl.pl</a>
 *
 * @author lukasz.olczak@polsl.pl
 */
public abstract class BaseNodeDelegate {
  /**
   * slf4j Logger.
   */
  private static final Logger log = LoggerFactory.getLogger(BaseNodeDelegate.class.getName());

  protected ServiceLocator serviceLocator;

  protected ManagerException createCommunicationException(Exception e) {
    return new ManagerException("Couldn't communicate with server", e);
  }

  protected ServiceLocator getServiceLocator() {
    return serviceLocator;
  }

  public void setServiceLocator(ServiceLocator serviceLocator) {
    this.serviceLocator = serviceLocator;
  }
}
